
var MRP=function()
	{
};
MRP.setObject=function()
	{
	eval("MRP.instance = document."+MRP.objectId+";
	");
	if(MRP.instance==null)
		{
		MRP.instance=document.getElementById(MRP.objectId)
	}
};
MRP.setElementId=function(a)
	{
	MRP.elementId=a
};
MRP.setObjectId=function(a)
	{
	MRP.objectId=a;
	MRP.setObject()
};
MRP.play=function()
	{
	MRP.instance.playSound()
};
MRP.stop=function()
	{
	MRP.instance.stopSound()
};
MRP.setVolume=function(a)
	{
	MRP.instance.setVolume(a/100)
};
MRP.showInfo=function(a)
	{
	MRP.instance.showInfo(a)
};
MRP.setTitle=function(a)
	{
	MRP.instance.setTitle(a)
};
MRP.setUrl=function(a)
	{
	MRP.instance.setUrl(a)
};
MRP.setFallbackUrl=function(a)
	{
	MRP.instance.setFallbackUrl(a)
};
MRP.setCallbackFunction=function(a)
	{
	musesCallback=a
};
MRP.callbackExists=function()
	{
	var a="error";
	a=typeof musesCallback;
	return a!="undefined"&&a!="error"
};
MRP.insert=function(d)
	{
	if(d.wmode==null)
		{
		d.wmode="window"
	}
	if(d.id==null)
		{
		d.id=MRP.objectId
	}
	var a="url="+d.url;
	a+="&lang="+(d.lang!=null?d.lang:"auto");
	a+="&codec="+d.codec;
	a+="&tracking=true";
	a+="&volume="+(d.volume!=null?d.volume:100);
	if(d.introurl!=null)
		{
		a+="&introurl="+d.introurl
	}
	if(d.autoplay!=null)
		{
		a+="&autoplay="+(d.autoplay?"true":"false")
	}
	if(d.jsevents!=null)
		{
		a+="&jsevents="+(d.jsevents?"true":"false")
	}
	if(d.buffering!=null)
		{
		a+="&buffering="+d.buffering
	}
	if(d.metadataProxy!=null)
		{
		a+="&metadataproxy="+d.metadataProxy
	}
	if(d.reconnectTime!=null)
		{
		a+="&reconnecttime="+d.reconnectTime
	}
	if(d.fallbackUrl!=null)
		{
		a+="&fallback="+d.fallbackUrl
	}
	if(d.skin.indexOf("/")==-1)
		{
		if(d.skin=="original"||d.skin=="tiny")
			{
			a+="&skin="+d.skin
		}
		else
			{
			a+="&skin=http://www.museter.com/skins/"+d.skin+"/ffmp3-"+d.skin+".xml"
		}
	}
	else
		{
		a+="&skin="+d.skin
	}
	a+="&title="+d.title;
	a+="&welcome="+d.welcome;
	var b="http://www.museter.com/ffmp3.swf";
	var e='width="'+d.width+'" height="'+d.height+'" ';
	if(d.bgcolor!=null)
		{
		e+='bgcolor="'+d.bgcolor+'" '
	}
	var f='<object id="'+d.id+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '+e+">";
	f+='<param name="movie" value="'+b+'" />';
	f+='<param name="flashvars" value="'+a+'" />';
	f+='<param name="wmode" value="'+d.wmode+'" />';
	f+='<param name="allowScriptAccess" value="always" />';
	f+='<param name="scale" value="noscale" />';
	if(d.bgcolor!=null)
		{
		f+='<param name="bgcolor" value="'+d.bgcolor+'" />'
	}
	f+='<embed name="'+d.id+'" src="'+b+'" flashvars="'+a+'" scale="noscale" wmode="'+d.wmode+'" '+e+' allowScriptAccess="always" type="application/x-shockwave-flash" />';
	f+="</object>";
	if(d.callbackFunction!=null)
		{
		MRP.setCallbackFunction(d.callbackFunction)
	}
	else
		{
		if(d.jsevents==true&&!MRP.callbackExists())
			{
			MRP.setCallbackFunction(function(g,c)
				{
			}
			)
		}
	}
	if(d.elementId==null&&MRP.elementId!=null)
		{
		d.elementId=MRP.elementId
	}
	if(d.elementId==null)
		{
		document.write(f)
	}
	else
		{
		document.getElementById(d.elementId).innerHTML=f
	}
	MRP.setObject()
};
